// var OSS = require('ali-oss');
import OSS from "ali-oss";
export function clientFn() {
  var client = new OSS({
    endpoint: "oss-cn-beijing.aliyuncs.com", //填写Bucket所在地域
    accessKeyId: "LTAI5tJ4KiQ7iBenxu9CUrG5",
    accessKeySecret: "uvGEQVL6HucayJUyagySuWyzRWzlf6",
    bucket: "rantoki",
  }); //后端提供数据
  return client;
}
/**
 * 生成随机uuid
 */
// export const getFileNameUUID = () => {
//   function rx() {
//     return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
//   }
//   return `${+new Date()}_${rx()}${rx()}`;
// };

// 随机生成uuid

export const getFileNameUUID = () => {
  return (
    Math.random().toString(36).substring(2) +
    new Date().getTime().toString(36)
  );
}



